//获取文章分类
import request from '@/utils/request'
//获取
export const articleGetChannelsService=()=> request.get('https://big-event-vue-api-t.itheima.net/my/cate/list')
//添加
export const articleAddChannelsService=(data)=> request.post('https://big-event-vue-api-t.itheima.net/my/cate/add',data)
//修改
export const articleEditChannelsService=(data)=> request.put('https://big-event-vue-api-t.itheima.net/my/cate/info',data)
//删除
export const articleDelChannelsService=(id)=> request.delete('https://big-event-vue-api-t.itheima.net/my/cate/del',{
    params:{id}
})



//获取文章列表
export const articleGetListService = (params)=> request.get('https://big-event-vue-api-t.itheima.net/my/article/list',{
    params
})
//发布
export const articleAddService = (data)=> request.post('https://big-event-vue-api-t.itheima.net/my/article/add',data)
//获取
export const articleGetDataService = (id)=>request.get('https://big-event-vue-api-t.itheima.net/my/article/info',{params:{id}})
//更新
export const articleRenewDataService = (data)=>request.put('https://big-event-vue-api-t.itheima.net/my/article/info',data)
//删除
export const artDelService = (id) => request.delete('https://big-event-vue-api-t.itheima.net/my/article/info', { params: { id } })   